import bsinRequest from '../utils/bsinRequest';

// 根据启动表单启动流程
export const startProcessInstanceWithForm = (params: object) => {
  return bsinRequest('/startProcessInstanceWithForm', {
    serviceName: 'BsinRuntimeService',
    methodName: 'startProcessInstanceWithForm',
    bizParams: {
      ...params,
    },
  });
};

// 任务表单
export const getProcessDefinitionTaskFormData = (params: object) => {
  return bsinRequest('/getTaskFormData', {
    serviceName: 'BsinFormRepositoryService',
    methodName: 'getTaskFormData',
    bizParams: {
      ...params,
    },
  });
};
